<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<link rel="stylesheet" href="${ctx}/static/css/style.css" type="text/css" /> 
<link rel="stylesheet" href="${ctx}/static/css/style1.css" type="text/css" /> 
<link rel="stylesheet" href="${ctx}/static/css/kongjian.css" type="text/css" /> 
<script src="${ctx}/static/script/jquery-1.4.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="${ctx}/static/css/jquery.ui.all.css">
<script src="${ctx}/static/script/jquery.ui.core.js"></script>
<script type="text/javascript" src="${ctx}/static/My97DatePicker/WdatePicker.js"></script>
<title>员工管理</title>
<script language="JavaScript">
	function jumpPage(pageNo) {
		$("#pageNo").val(pageNo);
		$("#mainForm").submit();
	}
</script>
</head>
<body>
	<div class="er_banner">员工管理</div>
<form:form id="mainForm" modelAttribute="staffForm"  action="${ctx}/account/user/list" method="post">
<input type="hidden" name="pageNo" id="pageNo" value="${page.pageNo}"/>
	<div class="shenqing2">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="80">员工编号：</td>
				<td width="150px" style="color: #2E74D1;"><input type="text" name ="staffCode" class="ggkj_inputtext_80" value="${staffForm.staffCode}" /></td>
				<td width="85">员工姓名：</td>
				<td width="150px" style="color: #2E74D1;"><input type="text" name="name" class="ggkj_inputtext_80" value="${staffForm.name}" /></td>
				<td width="85">所在部门：</td>
				<td>
				<form:select class="u83" id="departmentId"  path="departmentId">
				<option value="">无限制</option>
				<form:options items="${depList}"   itemLabel="name" itemValue="id"/>
				</form:select></td>
				<td width="150px" style="color: #2E74D1;"></td>
				<td width="85">入职日期：</td>
				<td width="250px" style="color: #2E74D1;"><input type="text" size="7" readonly="true" name="startDate" onClick="WdatePicker()" value="${staffForm.startDate}"/>-<input type="text" size="7" readonly="true" name="endDate" onClick="WdatePicker()" value="${staffForm.endDate}" /></td>
				 <td width="93"><input name="Input" type="submit" class="chaxun_btn" value="&nbsp;&nbsp;查询" />
			</tr>
		</table>
	</div>
</form:form>
	<div clas="yiban" style="text-align: left; padding-left: 3px; margin-top: 10px;">
		<p>
			<a href="${ctx}/account/user/create" class="ggkj_btnNormal1"> <span class="ggkj_btnNormal_span"><input name="" type="button" value="员工入职 " onclick="window.location=('${ctx}/account/user/create');" class="ggkj_btnInner1" /></span>
			</a>
		</p>
	</div>
	<div class="yiban">
		<table style="width: 100%;" class="ggkj_table" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<th scope="col">员工编号</th>
				<th scope="col">员工姓名</th>
				<th scope="col">所在部门</th>
				<th scope="col">电话</th>
				<th scope="col">移动电话</th>
				<th scope="col">性别</th>		
				<th scope="col">入职日期</th>
				<th scope="col">状态</th>
				<th scope="col">操作</th>
			</tr>
			 <c:forEach items="${page.result}" var="item" varStatus="index">
			 <c:if test="${index.count%2==1}"><tr class="ggkj_tdColr"></c:if>
		   
		    <td>${item.staffCode}</td>
		    <td>${item.name}</td>
		    <td>${item.department.name}</td>
		    <td>${item.tel}</td>
		    <td>${item.mobile}</td>
		    <td>${item.genderDesc}</td>
		    <td><fmt:formatDate value="${item.createDate}"/></td>
		    <td>${item.statusDesc}</td>
		    <td></td>
		    </tr>
	  </c:forEach>
		</table>

	</div>
	<div class="ggkj_pagecontainer">
	  <div class="ggkj_pageBGleft">
	    	<span class="ggkj_pageBGright"></span>
	    	<a href="javascript:jumpPage(1)" class="ggkj_pageUpa">
	        
	        </a>
	        <a href="javascript:jumpPage(${page.prePage})" class="ggkj_pageUp">
	        
	        </a>
	        <span class="ggkj_insertline"></span>
	        <span class="ggkj_pageSpan">
	        	页<input type="text" id="pageNo" name="pageNo" class="ggkj_inputtext_30" value="${page.pageNo}">OF ${page.totalPages}
	        </span>
	        <span class="ggkj_insertline"></span>
	        <a href="javascript:jumpPage(${page.nextPage})" class="ggkj_pageDown">
	        
	        </a>
	        <a href="javascript:jumpPage(${page.totalPages})" class="ggkj_pageDowna">
	        
	        </a>
	          </div>
	</div>
</body>
</html>
